#ifndef VIDEO_H
#define VIDEO_H

#include <QWidget>
#include <QUdpSocket>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include <QBuffer>
#include <QPixmap>

namespace Ui {
class Video;
}

class Video : public QWidget
{
    Q_OBJECT

public:
    explicit Video(QWidget *parent = 0);
    ~Video();

private:
    Ui::Video *ui;
    QUdpSocket *udpSocket;
    void sendVideoRequest();
    void processPendingDatagrams();
    void saveImage();
    QByteArray mjpegBuffer;

};

#endif // VIDEO_H
